import React from 'react'
import {RouterRwaStore} from '../types/index'
const Layout = React.lazy(()=>import('../Layout/index'))
const Home = React.lazy(()=>import('../views/home'))
const Login = React.lazy(()=>import('../views/Login'))
const Register = React.lazy(()=>import('../views/register/index'))
const Allarticle = React.lazy(()=>import('../views/allArticles'))
const ClassifyAdmin = React.lazy(()=>import('../views/classifyAdmin'))
const LabelAdmin = React.lazy(()=>import('../views/labelAdmin'))
const PageAdmin = React.lazy(()=>import('../views/pageAdmin'))
const Personal = React.lazy(()=>import('../views/Personal'))
const Knowledge = React.lazy(()=>import('../views/knowledge'))
const Comment = React.lazy(()=>import('../views/comment'))
const Poater = React.lazy(()=>import('../views/poster'))
const Eail = React.lazy(()=>import('../views/email'))
const User = React.lazy(()=>import('../views/user'))
const Setting = React.lazy(()=>import('../views/setting'))
const File = React.lazy(()=>import('../views/file'))
const Seach = React.lazy(()=>import('../views/search'))
const Statistics = React.lazy(()=>import('../views/statistics'))
export const staicRoutes:RouterRwaStore[]=[
   {
      path:'/login',
      element:<Login></Login>,
       meta:{
              label:'登录',
              hidden:true
            }
    },
    {
      path:'/register',
      element:<Register></Register>,
       meta:{
              label:'注册',
              hidden:true
            }
    },
    {
    path:'/',
    element:<Layout><Home></Home></Layout>,
    meta:{
      label:'工作台'
    }
    },
    {
        path:'/article',
        meta:{
         label:'文章管理',
        },
        children:[
          {
            path:'/article/allarticle',
            element:<Layout><Allarticle></Allarticle></Layout>,
            meta:{
              label:'所有文章',
              role:['访客'],
               hidden:false
            }
          },
          {
            path:'/article/labelAdmin',
            element:<Layout><LabelAdmin></LabelAdmin></Layout>,
            meta:{
              label:'标签管理',
              role:['访客'],
               hidden:false
            }
          },
          {
            path:'/article/classifyAdmin',
            element:<Layout><ClassifyAdmin></ClassifyAdmin></Layout>,
            meta:{
              label:'分类管理',
              role:['访客'],
              hidden:false
            }
          },
        ]
    }, 
   {
     path:'/pageAdmin',
     element:<Layout><PageAdmin></PageAdmin></Layout>,
      meta:{
       label:'页面管理',
       role:['访客'],
        hidden:false
      }
   },
  {
    path:'/Personal',
    element:<Layout><Personal></Personal></Layout>,
    meta:{
      label:'个人中心',
      role:['访客'],
      hidden:true
    }
  },
  {
    path:'/Knowledge',
    element:<Layout><Knowledge></Knowledge></Layout>,
    meta:{
      label:'知识小册',
      role:['访客'],
      hidden:false
    }
  },
   {
    path:'/poater',
    element:<Layout><Poater></Poater></Layout>,
    meta:{
      label:'海报管理',
      role:['访客'],
      hidden:false
    }
  },
  {
    path:'/comment',
    element:<Layout><Comment></Comment></Layout>,
    meta:{
      label:'评论管理',
      role:['访客'],
      hidden:false
    }
  },
  
  {
    path:'/eail',
    element:<Layout><Eail></Eail></Layout>,
    meta:{
      label:'邮件管理',
      role:['访客'],
      hidden:false
    }
  },
  {
    path:'/user',
    element:<Layout><User></User></Layout>,
     meta:{
      label:'用户管理',
      role:['管理员'],
      hidden:false
    }
  },
   {
    path:'/setting',
    element:<Layout><Setting></Setting></Layout>,
     meta:{
      label:'系统管理',
      role:['访客'],
      hidden:false
    }
  },
    {
    path:'/file',
    element:<Layout><File></File></Layout>,
     meta:{
      label:'文件管理',
      role:['访客'],
      hidden:false
    }
  },   
   {
    path:'/search',
    element:<Layout><Seach></Seach></Layout>,
     meta:{
      label:'搜索管理',
      role:['访客'],
      hidden:false
    }
  },  
   {
    path:'/statistics',
    element:<Layout><Statistics></Statistics></Layout>,
     meta:{
      label:'统计管理',
      role:['访客'],
      hidden:false
    }
  },    
]